// 获取菜单信息
/* 
  一、导航菜单实现思路
  1.用户登录系统
  用户登录系统之后，跳转到首页。

  2.根据用户加载导航菜单
  在路由导航守卫路由时加载用户导航菜单并存储到store。

  加载过程如下，返回结果排除按钮类型。

  user -> user_role -> role -> role_menu -> menu。

  3.导航栏读取菜单树
  导航栏到sotre读取导航树并进行展示。


  二、页面按钮实现思路
  1.用户登录系统
  用户登录系统之后，跳转到首页。

  2.根据用户加载权限标识集合
  在路由导航守卫路由时加载用户权限标识集合。
  加载过程如下，返回结果是用户权限标识的集合。
  user -> user_role -> role -> role_menu -> menu。

  3.页面按钮控制
  页面操作按钮提供权限标识，查询是否在用户权限标识集合中。
  在：有权限，可见或可用，不在：无权限，不可见或禁用。 
  
*/

export function getMenu () {
  return {
    url: 'menu/findTree',
    type: 'get',
    data:{
      "code": 200,
      "msg": null,
      "data": [
        {
          "id": 0, //菜单的id
          "parentId": 0, //菜单的父级（上一级）菜单ID
          "name": "首页", //菜单的显示名称
          "url": "/", //菜单点击后的url
          "type": 1, //0：目录   1：菜单   2：按钮',
          "icon": "fa fa-home", // 字体图标
          "orderNum": 0,//给你做排序用的 目前我前端没用上
          "parentId": null, //上级菜单的Id
          "parentName": null, //上级菜单的名称
          "level": 0, // 0一级菜单 1二级菜单 2三级菜单
          "perms": null,//权限授权(多个用逗号分隔，如：sys:user:add,sys:user:edit)
          children:[]
        },
        {
          "menuId": 1,
          "parentId": 0,
          "name": "系统管理",
          "url": null,
          "perms": null,
          "type": 0,
          "icon": "fa el-icon-setting",
          "orderNum": 0,
          "createBy": null, // 创建人
          "createTime": null,// 创建时间
          "lastUpdateBy": null, // 跟新人
          "lastUpdateTime": null, // 跟新时间
          "delFlag": 0, // 是否删除  -1：已删除  0：正常,
          "children": [
            {
              "menuId": 2,
              "parentId": 1,
              "name": "用户管理",
              "url": "/sys/user",
              "perms": null,
              "type": 1,
              "icon": "el-icon-service",
              "orderNum": 1,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": [
                /* {
                  "menuId": 9,
                  "parentId": 2,
                  "name": "查看",
                  "url": null,
                  "perms": "sys:user:view",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 10,
                  "parentId": 2,
                  "name": "新增",
                  "url": null,
                  "perms": "sys:user:save",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 11,
                  "parentId": 2,
                  "name": "修改",
                  "url": null,
                  "perms": "sys:user:update",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 12,
                  "parentId": 2,
                  "name": "删除",
                  "url": null,
                  "perms": "sys:user:delete",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                } */
              ]
            },
            {
              "menuId": 3,
              "parentId": 1,
              "name": "机构管理",
              "url": "/sys/dept",
              "perms": null,
              "type": 1,
              "icon": "el-icon-news",
              "orderNum": 2,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": [
                /* {
                  "menuId": 13,
                  "parentId": 3,
                  "name": "查看",
                  "url": null,
                  "perms": "sys:dept:view",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 14,
                  "parentId": 3,
                  "name": "新增",
                  "url": null,
                  "perms": "sys:dept:save",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 15,
                  "parentId": 3,
                  "name": "修改",
                  "url": null,
                  "perms": "sys:dept:update",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 16,
                  "parentId": 3,
                  "name": "删除",
                  "url": null,
                  "perms": "sys:dept:delete",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                } */
              ]
            },
            {
              "menuId": 4,
              "parentId": 1,
              "name": "角色管理",
              "url": "/sys/role",
              "perms": null,
              "type": 1,
              "icon": "el-icon-view",
              "orderNum": 4,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": [
                /* {
                  "menuId": 17,
                  "parentId": 4,
                  "name": "查看",
                  "url": null,
                  "perms": "sys:role:view",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 18,
                  "parentId": 4,
                  "name": "新增",
                  "url": null,
                  "perms": "sys:role:save",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 19,
                  "parentId": 4,
                  "name": "修改",
                  "url": null,
                  "perms": "sys:role:update",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 20,
                  "parentId": 4,
                  "name": "删除",
                  "url": null,
                  "perms": "sys:role:delete",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                } */
              ]
            },
            {
              "menuId": 5,
              "parentId": 1,
              "name": "菜单管理",
              "url": "/sys/menu",
              "perms": null,
              "type": 1,
              "icon": "el-icon-menu",
              "orderNum": 5,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": [
                /* {
                  "menuId": 21,
                  "parentId": 5,
                  "name": "查看",
                  "url": null,
                  "perms": "sys:menu:view",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 22,
                  "parentId": 5,
                  "name": "新增",
                  "url": null,
                  "perms": "sys:menu:save",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 23,
                  "parentId": 5,
                  "name": "修改",
                  "url": null,
                  "perms": "sys:menu:update",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                },
                {
                  "menuId": 24,
                  "parentId": 5,
                  "name": "删除",
                  "url": null,
                  "perms": "sys:menu:delete",
                  "type": 2,
                  "icon": null,
                  "orderNum": 0,
                  "createBy": null,
                  "createTime": null,
                  "lastUpdateBy": null,
                  "lastUpdateTime": null,
                  "delFlag": 0,
                  "children": []
                } */
              ]
            },
            {
              "menuId": 6,
              "parentId": 1,
              "name": "SQL监控",
              "url": "/druid/sql",
              "perms": null,
              "type": 1,
              "icon": "el-icon-info",
              "orderNum": 6,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": []
            },
            {
              "menuId": 8,
              "parentId": 1,
              "name": "系统日志",
              "url": "/sys/log",
              "perms": "sys:log:list",
              "type": 1,
              "icon": "el-icon-info",
              "orderNum": 7,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": []
            }
          ]
        },
        {
          "menuId": 25,
          "parentId": 0,
          "name": "内容管理",
          "url": null,
          "perms": null,
          "type": 0,
          "icon": "el-icon-document",
          "orderNum": 0,
          "createBy": null,
          "createTime": null,
          "lastUpdateBy": null,
          "lastUpdateTime": null,
          "delFlag": 0,
          "children": [
            {
              "menuId": 26,
              "parentId": 25,
              "name": "栏目管理",
              "url": "/content/category",
              "perms": null,
              "type": 1,
              "icon": "el-icon-tickets",
              "orderNum": 1,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": []
            },
            {
              "menuId": 27,
              "parentId": 25,
              "name": "文章管理",
              "url": "/content/artical",
              "perms": null,
              "type": 1,
              "icon": "el-icon-tickets",
              "orderNum": 2,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": []
            }
          ]
        },
        {
          "menuId": 28,
          "parentId": 0,
          "name": "使用案例",
          "url": null,
          "perms": null,
          "type": 0,
          "icon": "el-icon-picture-outline",
          "orderNum": 0,
          "createBy": null,
          "createTime": null,
          "lastUpdateBy": null,
          "lastUpdateTime": null,
          "delFlag": 0,
          "children": [
            {
              "menuId": 29,
              "parentId": 28,
              "name": "国际化",
              "url": "/demo/i18n",
              "perms": null,
              "type": 1,
              "icon": "el-icon-edit",
              "orderNum": 1,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": []
            },
            {
              "menuId": 30,
              "parentId": 28,
              "name": "换皮肤",
              "url": "/demo/theme",
              "perms": null,
              "type": 1,
              "icon": "el-icon-picture",
              "orderNum": 2,
              "createBy": null,
              "createTime": null,
              "lastUpdateBy": null,
              "lastUpdateTime": null,
              "delFlag": 0,
              "children": []
            }
          ]
        }
      ]
    }
  }
}